<template>
    <div>
        <h3>{{content.title}}</h3>
        <hr>
        <div class="content" v-html="content.content">
        </div>
    </div>

</template>
<script>
export default {
    data(){
        return{
            id:this.$route.params.id,
            content:{}
        }
    },
    created(){
        this.getGoodsDesc();
    },
    methods:{
        getGoodsDesc(){
            this.$http.get("api/goods/getdesc/"+this.id).then((result)=>{
                 if(result.body.status===0){
                     this.content=result.body.message[0]
                 }else{
                     alert("请求失败");
                 }
            })
        }
    }
}
</script>
<style>
  h3{
    font-size:18px;
    color:deepskyblue;
    text-align: center;
    line-height:20px;
  }
  .content{
      padding:4px;
  }
  .content img{
      width:100%;
  }
</style>

